
module.exports.option = async (data) => {
   console.log(`execute condition.option : ${JSON.stringify(data)}`);
   options =  [
    {
        fieldSystemName: "field1", // 字段标识，英文字符串
        displayName: "标题", // 字段名
        fieldType: "text", // 字段表单类型，候选值:text,userchooser,date,tselect,select_text,percent,float,tselect-multiple，具体用法请参考文档和示例
        fieldIsSystem: false, // 是否系统字段，这里统一为false
        fieldOption: [], // 字段候选值
        fieldOptionSort: [] // 候选值排序
    },
    {
        fieldSystemName: "field2",
        displayName: "处理人",
        fieldType: "userchooser",
        fieldIsSystem: false,
        fieldOption: [],
        fieldOptionSort: []
    },
    {
        fieldSystemName: "field3",
        displayName: "处理时间",
        fieldType: "date",
        fieldIsSystem: false,
        fieldOption: [],
        fieldOptionSort: []
    },
    {
        fieldSystemName: "field3",
        displayName: "状态",
        fieldType: "tselect",
        fieldIsSystem: false,
        fieldOption: {
            open: "未开始",
            progressing: "进行中",
            done: "已完成"
        },
        fieldOptionSort: [
            {
                value: "open",
                label: "未开始"
            },
            {
                value: "progressing",
                label: "进行中"
            },
            {
                value: "done",
                label: "已完成"
            }
        ]
    },
    {
        fieldSystemName: "field4",
        displayName: "迭代",
        fieldType: "select_text",
        fieldIsSystem: false,
        fieldOption: {
            9999988: "当前迭代",
            1000000755001568633: "【固氮菌】5",
            1000000755001567989: "【阿尼亚】5",
        },
        fieldOptionSort: [
            {
                value: "9999988",
                label: "当前迭代"
            },
            {
                value: "1000000755001568633",
                label: "【固氮菌】5"
            },
            {
                value: "1000000755001567989",
                label: "【阿尼亚】5"
            },
        ]
    },
    {
        fieldSystemName: "field6",
        displayName: "进度",
        fieldType: "percent",
        fieldIsSystem: false,
        fieldOption: [],
        fieldOptionSort: []
    },
    {
        fieldSystemName: "field7",
        displayName: "完成时间",
        fieldType: "datetime",
        fieldIsSystem: false,
        fieldOption: [],
        fieldOptionSort: []
    },
    {
        fieldSystemName: "field8",
        displayName: "价格",
        fieldType: "float",
        fieldIsSystem: true,
        fieldOption: [],
        fieldOptionSort: []
    },
];
return options;
};
module.exports.data = async (data) => {
  console.log(`execute condition.data : ${JSON.stringify(data)}`);
  return {
    status:1, // 状态，候选值：1（成功）
    msg:'xxxxxx', // 显示在判断失败或判断待定时的文案
    data:{
      field1:'aaa',
      field2:'bbb',
      field3:'ccc',
      field4:'ddd',
    },
  };
};


